import numpy as np
import pandas as pd
data = np.arange(12).reshape((3,4))
df3 = pd.DataFrame(data,index=['d','b','c'],columns=['dd','aa','cc','bb'])
print(df3)
df3.sort_index(axis=0)  #行排序
#%%
df3.sort_index(axis=1)  #列排序
df3.sort_values(by='cc')#按’cc’列的数据进行排序